﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectFundDetail.aspx.cs"
    Inherits="Thksoft.Module.DataDetail.ProjectFundDetail" EnableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html class="L_UI" xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../../CSS/Main.css" rel="stylesheet" type="text/css" />
    <link href="../../CSS/Buss.css" rel="stylesheet" type="text/css" />
    <link href="/UserCotrols/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
    <script src="/UserCotrols/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        var option = {};
        option.CancelCallback = function (index, layero) {
            //刷新页面
            $("#btnSelect").click();
        };

        window.PrintEventArry = [{}, {}, {}, {}, {}, {}, {}];
        window.PrintEvent = function () {
            for (var i = 0; i < 7; i++) {

                //console.log($("#TabContainer1_TabPanel" + i + "_tab,ajax__tab_active"));
                if ($("#TabContainer1_TabPanel" + i + "_tab.ajax__tab_active").length > 0) {

                    var htmlDom = $(window.PrintEventArry[i].Html); //获取当前打印表单的html

                    $(htmlDom).find("table:eq(1)").css("width", "98%");

                    $(htmlDom).find("table:eq(1) tr").each(function () {    //遍历当前打印表单的每一行
                        $(this).children().last().remove()  //删除当前行的最后一列
                    })

                    var panlehtml = htmlDom.html(); //获取删除了最后一列的html
                    console.log(panlehtml);
                    $.post(
                        "/Module/StatisticalReport/api.ashx",
                        JSON.stringify({
                            Type: "Print",
                            Data: panlehtml
                        }),
                        function (data) {
                            if (data.Success) {
                                top.MessageBox.Print({
                                    Value: "ID=HTML&VALUE=" + data.Data,
                                    Area: ["900px", "600px"],
                                    Scrollbar: true
                                });
                            }
                        })
                    return;
                }
            }
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="Window" style="min-width: 1500px;">
            <div class="Header" style="height: 89px;">
                <table border="0" cellpadding="0" cellspacing="0" width="100%" class="table">
                    <tr>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">公&nbsp;&nbsp;&nbsp;&nbsp;司：
                        </td>
                        <td style="text-align: left; padding-left: 10px; width: 15%;">
                            <uc2:CtrlCompany runat="server" ID="FORM_COMPANY_ID" Width="200px" />
                        </td>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">业务日期：
                        </td>
                        <td class="righttd">
                            <input type="text" runat="server" id="FORM_DATE" onclick="WdatePicker({ dateFmt: 'yyyy-MM' })" class="Wdate INPUT" style="width: 75px;" />
                            月<span style="color: Red;">*</span>
                            <asp:DropDownList ID="DropDownList3" runat="server" CssClass="INPUT" Width="35px">
                                <asp:ListItem Selected="True" Value="1">1 </asp:ListItem>
                                <asp:ListItem Value="2">2 </asp:ListItem>
                                <asp:ListItem Value="3">3 </asp:ListItem>
                                <asp:ListItem Value="4">4 </asp:ListItem>
                                <asp:ListItem Value="5">5 </asp:ListItem>
                            </asp:DropDownList>
                            周 <span style="color: Red;">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="4">
                            <div runat="server" id="butoomle" style="text-align: center;">
                                <asp:Button ID="btnSelect" runat="server" Text="查询" CssClass="bt_css_s" OnClick="btnSelect_Click" />&nbsp;
                            <asp:Button ID="btnDaochu" runat="server" Text="导出" CssClass="bt_css_s" OnClick="btnDaochu_Click" />&nbsp;
                            <button type="button" onclick="window.PrintEvent()" class="bt_css_s">
                                打印</button>
                                <asp:Button ID="btnPrint" runat="server" Text="打印" CssClass="hide" OnClick="btnPrint_Click" />&nbsp;
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="Content" style="top: 70px; overflow-y: auto;">
                <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                </asp:ToolkitScriptManager>
                <asp:HiddenField ID="HiddenField3" runat="server" />
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:TabContainer ID="TabContainer1" runat="server" CssClass="ajax__tab_xp-theme"
                            ActiveTabIndex="0">
                            <asp:TabPanel runat="server" ID="TabPanel0" HeaderText="资金计划总表">
                                <ContentTemplate>
                                    <div>
                                        <asp:PlaceHolder ID="PlaceHolder0" runat="server"></asp:PlaceHolder>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel runat="server" ID="TabPanel1" HeaderText="主营业务收入表">
                                <ContentTemplate>
                                    <div>
                                        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel runat="server" ID="TabPanel2" HeaderText="天然气购入表">
                                <ContentTemplate>
                                    <div>
                                        <asp:PlaceHolder ID="PlaceHolder2" runat="server"></asp:PlaceHolder>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel runat="server" ID="TabPanel3" HeaderText="安装外包费用表">
                                <ContentTemplate>
                                    <div>
                                        <asp:PlaceHolder ID="PlaceHolder3" runat="server"></asp:PlaceHolder>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel runat="server" ID="TabPanel4" HeaderText="材料费用表">
                                <ContentTemplate>
                                    <div>
                                        <asp:PlaceHolder ID="PlaceHolder4" runat="server"></asp:PlaceHolder>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel runat="server" ID="TabPanel5" HeaderText="大修费用表">
                                <ContentTemplate>
                                    <div>
                                        <asp:PlaceHolder ID="PlaceHolder5" runat="server"></asp:PlaceHolder>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel runat="server" ID="TabPanel6" HeaderText="城市管网项目表">
                                <ContentTemplate>
                                    <div>
                                        <asp:PlaceHolder ID="PlaceHolder6" runat="server"></asp:PlaceHolder>
                                    </div>
                                </ContentTemplate>
                            </asp:TabPanel>
                        </asp:TabContainer>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </div>
    </form>
</body>
</html>